/**      
 * @file		sum.cpp
 * @description		This application reads two numbers from a input file
 *			and outputs the results to the user.
 * @course		CSCI 123 Section 00000
 * @assignment 
 * @date		mm/dd/yyyy
 * @author		Brad Rippe (00000000) brippe@fullcoll.edu
 * @version		1.0
 */
#include <iostream>
#include <fstream>
using namespace std;

/**
 * Sums two numbers from a file input stream
 * @param	aSourceFile the input stream to obtain the numbers from
 * @pre		the input file stream has been initialized and opened, ready
 *		to ready from the stream
 * @post	two numbers have been summed and the result has been output
 *		to the user
 */
void sum(ifstream& aSourceFile);

/**
 * @return zero if the application executes successfully
 */
int main() {
	ifstream fin;
	fin.open("numbers.dat");
	sum(fin);
	return 0;
}

void sum(ifstream& aSourceFile) {
	int n1;
	int n2;
	aSourceFile >> n1 >> n2;
	cout << n1 << " + " << n2 
		 << " = " << (n1 + n2) << endl;
}

